import { proRequest } from "@/utils/http";
import type { Key } from "react";
import { ReqGetTMListResponse, tmInfo } from './model/trademarkTypes';

// 获取品牌列表
export const reqTMList = (page: number, limit: number) => {
  return proRequest.get<any, ReqGetTMListResponse>(`/admin/product/baseTrademark/${page}/${limit}`)
}

// 新增品牌
export const reqAddTM = (tmInfo: tmInfo) => {
  return proRequest.post<any, null>('/admin/product/baseTrademark/save', tmInfo)
}

// 修改品牌
export const reqUpdateTM = (tmInfo: tmInfo) => {
  return proRequest.put('/admin/product/baseTrademark/update', tmInfo)
}

// 删除品牌
export const reqDelTM = (id: number) => {
  return proRequest.delete(`/admin/product/baseTrademark/remove/${id}`)
}